package net.csdn.business.mirror.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.csdn.business.mirror.entity.bean.ProjectMirrorBlack;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectMirrorBlackMapper extends BaseMapper<ProjectMirrorBlack> {

    @Select("<script>" +
            "select repo_path from project_mirror_black where repo_path in " +
            "<foreach item='item' index='index' collection='repoPaths' open='(' separator=', ' close=')'>" +
            "#{item}" +
            "</foreach>" +
            "</script>")
    List<String> getAllExistsRepoPath(@Param("repoPaths") List<String> repoPaths);
}
